#pragma once


/*
    日志消息模块 
    1:存储一条日志所需要的各个要素  [日志时间] [日志等级][日志由那个线程生成的线程id][产生该日志的源文件][行号][日志器名称][日志主体消息]
*/
#include<iostream>
#include"LogLevel.hpp"
#include"Util.hpp"
#include<thread>
#include<time.h>
namespace log
{
    struct LogMessage
    {
        time_t _ctime;
        LogLevel::level _level;
        std::thread::id _id;
        std::string _file;
        size_t _line;
        std::string _logger;
        std::string _payload;
        LogMessage()
        {}
        LogMessage(LogLevel::level level,
                   const std::string& file,
                   size_t line,
                   std::string logger,
                   std::string payload ):_ctime(util::Date::NowTime()),_id(std::this_thread::get_id()),
                                        _level(level),_file(file),_line(line),_logger(logger),_payload(payload)
                   {}
    };



}